package cn.com.xf.web.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.hibernate.validator.constraints.NotEmpty;

import cn.com.xf.domain.TblCheckLeave;

public class LeaveForm extends BaseForm {

	 
	private String userid;
	private String type;
	
	private String startDate;
	
	private String endDate;
	private String reason;
	private String addUser;
	
	private String siteid;
	private String sitename;
	private String deptid;
	private String id;
	
	private String leaveJson;

	// -----班次设置
	private String fCheckintime;
	private String fCheckouttime;
	private String fAllowEarlierMinute;
	private String fAllowLaterMinute;
	private String fLaterMinute;

	private String fEarlierMinute;
	private String fAsLate;
	private String fAsEarly;
	private String sCheckintime;
	private String sCheckouttime;

	private String sAllowEarlierMinute;
	private String sAllowLaterMinute;
	private String sLaterMinute;
	private String sEarlierMinute;
	private String sAsLate;

	private String sAsEarly;
	private String fCheckintime_hour;
	private String fCheckintime_minute;
	private String fCheckouttime_hour;
	private String fCheckouttime_minute;

	private String sCheckintime_hour;
	private String sCheckintime_minute;
	private String sCheckouttime_hour;
	private String sCheckouttime_minute;

	private String tCheckintime;
	private String tCheckouttime;
	private String tAllowEarlierMinute;
	private String tAllowLaterMinute;
	private String tLaterMinute;

	private String tEarlierMinute;
	private String tAsLate;
	private String tAsEarly;
	private String tCheckintime_hour;
	private String tCheckintime_minute;

	private String tCheckouttime_hour;
	private String tCheckouttime_minute;

	private String shiftName;
	private String fWorkDay;
	private String fCheckedDays;
	private String sWorkDay;
	private String sCheckedDays;
	private String tWorkDay;
	private String tCheckedDays;

	// -----人员排班
	private String shiftid;
	private String workDays;
	private String isCheck;
	private String shiftid2;
	private String shiftid3;
	private String shiftid4;
	private String shiftid5;

	private String startDate2;
	private String endDate2;
	private String startDate3;
	private String endDate3;
	private String startDate4;
	private String endDate4;
	private String startDate5;
	private String endDate5;

	private String isHoliday;
	private String isOvertime;
	
	private String scheduleid;
	
	// -----授权管理
	private String username;
	private String rolename;
	private String permissioins;
	private String roleId;
	private String roles;
	//------请假excel导出
	private String year_month;
	
	private Integer deptflag;
    private Integer personflag;
    private String deptremark;
    private String  personremark;
    private Integer flag;
    private String deptuser;
    private String personuser;
    private String remark;
    
	public Integer getDeptflag() {
		return deptflag;
	}

	public void setDeptflag(Integer deptflag) {
		this.deptflag = deptflag;
	}

	public Integer getPersonflag() {
		return personflag;
	}

	public void setPersonflag(Integer personflag) {
		this.personflag = personflag;
	}

	public String getDeptremark() {
		return deptremark;
	}

	public void setDeptremark(String deptremark) {
		this.deptremark = deptremark;
	}

	public String getPersonremark() {
		return personremark;
	}

	public void setPersonremark(String personremark) {
		this.personremark = personremark;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public String getDeptuser() {
		return deptuser;
	}

	public void setDeptuser(String deptuser) {
		this.deptuser = deptuser;
	}

	public String getPersonuser() {
		return personuser;
	}

	public void setPersonuser(String personuser) {
		this.personuser = personuser;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public String getAddUser() {
		return addUser;
	}

	public void setAddUser(String addUser) {
		this.addUser = addUser;
	}

	public String getSiteid() {
		return siteid;
	}

	public void setSiteid(String siteid) {
		this.siteid = siteid;
	}

	public String getDeptid() {
		return deptid;
	}

	public void setDeptid(String deptid) {
		this.deptid = deptid;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public boolean isEndDateBeforeStartDate() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		try {
			Date start = sdf.parse(startDate);
			Date end = sdf.parse(endDate);
			if (end.before(start))
				return true;
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return false;
	}

	public TblCheckLeave copyTo() throws Exception {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		TblCheckLeave leave = new TblCheckLeave();
		leave.setSiteid(siteid);
		leave.setUserid(userid);
		leave.setStartdate(sdf.parse(startDate));
		leave.setEnddate(sdf.parse(endDate));
		leave.setType(type);
		leave.setReason(reason);
		leave.setPersonuser(personuser);
		leave.setAddtime(new Date());
		leave.setFlag(flag);
		leave.setDeptflag(deptflag);
		leave.setPersonflag(personflag);
		return leave;
	}

	public TblCheckLeave copyTo(TblCheckLeave leave) throws Exception {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		leave.setSiteid(siteid);
		leave.setUserid(userid);
		leave.setStartdate(sdf.parse(startDate));
		leave.setEnddate(sdf.parse(endDate));
		leave.setType(type);
		leave.setReason(reason);
		leave.setFlag(flag);
		leave.setDeptflag(deptflag);
		leave.setPersonflag(personflag);
		return leave;
	}

	public String getfCheckintime() {
		return fCheckintime;
	}

	public void setfCheckintime(String fCheckintime) {
		this.fCheckintime = fCheckintime;
	}

	public String getfCheckouttime() {
		return fCheckouttime;
	}

	public void setfCheckouttime(String fCheckouttime) {
		this.fCheckouttime = fCheckouttime;
	}

	public String getfAllowEarlierMinute() {
		return fAllowEarlierMinute;
	}

	public void setfAllowEarlierMinute(String fAllowEarlierMinute) {
		this.fAllowEarlierMinute = fAllowEarlierMinute;
	}

	public String getfAllowLaterMinute() {
		return fAllowLaterMinute;
	}

	public void setfAllowLaterMinute(String fAllowLaterMinute) {
		this.fAllowLaterMinute = fAllowLaterMinute;
	}

	public String getfLaterMinute() {
		return fLaterMinute;
	}

	public void setfLaterMinute(String fLaterMinute) {
		this.fLaterMinute = fLaterMinute;
	}

	public String getfEarlierMinute() {
		return fEarlierMinute;
	}

	public void setfEarlierMinute(String fEarlierMinute) {
		this.fEarlierMinute = fEarlierMinute;
	}

	public String getfAsLate() {
		return fAsLate;
	}

	public void setfAsLate(String fAsLate) {
		this.fAsLate = fAsLate;
	}

	public String getfAsEarly() {
		return fAsEarly;
	}

	public void setfAsEarly(String fAsEarly) {
		this.fAsEarly = fAsEarly;
	}

	public String getsCheckintime() {
		return sCheckintime;
	}

	public void setsCheckintime(String sCheckintime) {
		this.sCheckintime = sCheckintime;
	}

	public String getsCheckouttime() {
		return sCheckouttime;
	}

	public void setsCheckouttime(String sCheckouttime) {
		this.sCheckouttime = sCheckouttime;
	}

	public String getsAllowEarlierMinute() {
		return sAllowEarlierMinute;
	}

	public void setsAllowEarlierMinute(String sAllowEarlierMinute) {
		this.sAllowEarlierMinute = sAllowEarlierMinute;
	}

	public String getsAllowLaterMinute() {
		return sAllowLaterMinute;
	}

	public void setsAllowLaterMinute(String sAllowLaterMinute) {
		this.sAllowLaterMinute = sAllowLaterMinute;
	}

	public String getsLaterMinute() {
		return sLaterMinute;
	}

	public void setsLaterMinute(String sLaterMinute) {
		this.sLaterMinute = sLaterMinute;
	}

	public String getsEarlierMinute() {
		return sEarlierMinute;
	}

	public void setsEarlierMinute(String sEarlierMinute) {
		this.sEarlierMinute = sEarlierMinute;
	}

	public String getsAsLate() {
		return sAsLate;
	}

	public void setsAsLate(String sAsLate) {
		this.sAsLate = sAsLate;
	}

	public String getsAsEarly() {
		return sAsEarly;
	}

	public void setsAsEarly(String sAsEarly) {
		this.sAsEarly = sAsEarly;
	}

	public String getfCheckintime_hour() {
		return fCheckintime_hour;
	}

	public void setfCheckintime_hour(String fCheckintime_hour) {
		this.fCheckintime_hour = fCheckintime_hour;
	}

	public String getfCheckintime_minute() {
		return fCheckintime_minute;
	}

	public void setfCheckintime_minute(String fCheckintime_minute) {
		this.fCheckintime_minute = fCheckintime_minute;
	}

	public String getfCheckouttime_hour() {
		return fCheckouttime_hour;
	}

	public void setfCheckouttime_hour(String fCheckouttime_hour) {
		this.fCheckouttime_hour = fCheckouttime_hour;
	}

	public String getfCheckouttime_minute() {
		return fCheckouttime_minute;
	}

	public void setfCheckouttime_minute(String fCheckouttime_minute) {
		this.fCheckouttime_minute = fCheckouttime_minute;
	}

	public String getsCheckintime_hour() {
		return sCheckintime_hour;
	}

	public void setsCheckintime_hour(String sCheckintime_hour) {
		this.sCheckintime_hour = sCheckintime_hour;
	}

	public String getsCheckintime_minute() {
		return sCheckintime_minute;
	}

	public void setsCheckintime_minute(String sCheckintime_minute) {
		this.sCheckintime_minute = sCheckintime_minute;
	}

	public String getsCheckouttime_hour() {
		return sCheckouttime_hour;
	}

	public void setsCheckouttime_hour(String sCheckouttime_hour) {
		this.sCheckouttime_hour = sCheckouttime_hour;
	}

	public String getsCheckouttime_minute() {
		return sCheckouttime_minute;
	}

	public void setsCheckouttime_minute(String sCheckouttime_minute) {
		this.sCheckouttime_minute = sCheckouttime_minute;
	}

	public String getShiftName() {
		return shiftName;
	}

	public void setShiftName(String shiftName) {
		this.shiftName = shiftName;
	}

	public String getfWorkDay() {
		return fWorkDay;
	}

	public void setfWorkDay(String fWorkDay) {
		this.fWorkDay = fWorkDay;
	}

	public String getfCheckedDays() {
		return fCheckedDays;
	}

	public void setfCheckedDays(String fCheckedDays) {
		this.fCheckedDays = fCheckedDays;
	}

	public String getsWorkDay() {
		return sWorkDay;
	}

	public void setsWorkDay(String sWorkDay) {
		this.sWorkDay = sWorkDay;
	}

	public String getsCheckedDays() {
		return sCheckedDays;
	}

	public void setsCheckedDays(String sCheckedDays) {
		this.sCheckedDays = sCheckedDays;
	}

	public String getShiftid() {
		return shiftid;
	}

	public void setShiftid(String shiftid) {
		this.shiftid = shiftid;
	}

	public String getWorkDays() {
		return workDays;
	}

	public void setWorkDays(String workDays) {
		this.workDays = workDays;
	}

	public String getIsCheck() {
		return isCheck;
	}

	public void setIsCheck(String isCheck) {
		this.isCheck = isCheck;
	}

	public String getIsHoliday() {
		return isHoliday;
	}

	public void setIsHoliday(String isHoliday) {
		this.isHoliday = isHoliday;
	}

	public String getIsOvertime() {
		return isOvertime;
	}

	public void setIsOvertime(String isOvertime) {
		this.isOvertime = isOvertime;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getRolename() {
		return rolename;
	}

	public void setRolename(String rolename) {
		this.rolename = rolename;
	}

	public String getPermissioins() {
		return permissioins;
	}

	public void setPermissioins(String permissioins) {
		this.permissioins = permissioins;
	}

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public String getRoles() {
		return roles;
	}

	public void setRoles(String roles) {
		this.roles = roles;
	}

	public String gettCheckintime() {
		return tCheckintime;
	}

	public void settCheckintime(String tCheckintime) {
		this.tCheckintime = tCheckintime;
	}

	public String gettCheckouttime() {
		return tCheckouttime;
	}

	public void settCheckouttime(String tCheckouttime) {
		this.tCheckouttime = tCheckouttime;
	}

	public String gettAllowEarlierMinute() {
		return tAllowEarlierMinute;
	}

	public void settAllowEarlierMinute(String tAllowEarlierMinute) {
		this.tAllowEarlierMinute = tAllowEarlierMinute;
	}

	public String gettAllowLaterMinute() {
		return tAllowLaterMinute;
	}

	public void settAllowLaterMinute(String tAllowLaterMinute) {
		this.tAllowLaterMinute = tAllowLaterMinute;
	}

	public String gettLaterMinute() {
		return tLaterMinute;
	}

	public void settLaterMinute(String tLaterMinute) {
		this.tLaterMinute = tLaterMinute;
	}

	public String gettEarlierMinute() {
		return tEarlierMinute;
	}

	public void settEarlierMinute(String tEarlierMinute) {
		this.tEarlierMinute = tEarlierMinute;
	}

	public String gettAsLate() {
		return tAsLate;
	}

	public void settAsLate(String tAsLate) {
		this.tAsLate = tAsLate;
	}

	public String gettAsEarly() {
		return tAsEarly;
	}

	public void settAsEarly(String tAsEarly) {
		this.tAsEarly = tAsEarly;
	}

	public String gettCheckintime_hour() {
		return tCheckintime_hour;
	}

	public void settCheckintime_hour(String tCheckintime_hour) {
		this.tCheckintime_hour = tCheckintime_hour;
	}

	public String gettCheckintime_minute() {
		return tCheckintime_minute;
	}

	public void settCheckintime_minute(String tCheckintime_minute) {
		this.tCheckintime_minute = tCheckintime_minute;
	}

	public String gettCheckouttime_hour() {
		return tCheckouttime_hour;
	}

	public void settCheckouttime_hour(String tCheckouttime_hour) {
		this.tCheckouttime_hour = tCheckouttime_hour;
	}

	public String gettCheckouttime_minute() {
		return tCheckouttime_minute;
	}

	public void settCheckouttime_minute(String tCheckouttime_minute) {
		this.tCheckouttime_minute = tCheckouttime_minute;
	}

	public String gettWorkDay() {
		return tWorkDay;
	}

	public void settWorkDay(String tWorkDay) {
		this.tWorkDay = tWorkDay;
	}

	public String gettCheckedDays() {
		return tCheckedDays;
	}

	public void settCheckedDays(String tCheckedDays) {
		this.tCheckedDays = tCheckedDays;
	}

	public String getShiftid2() {
		return shiftid2;
	}

	public void setShiftid2(String shiftid2) {
		this.shiftid2 = shiftid2;
	}

	public String getShiftid3() {
		return shiftid3;
	}

	public void setShiftid3(String shiftid3) {
		this.shiftid3 = shiftid3;
	}

	public String getShiftid4() {
		return shiftid4;
	}

	public void setShiftid4(String shiftid4) {
		this.shiftid4 = shiftid4;
	}

	public String getShiftid5() {
		return shiftid5;
	}

	public void setShiftid5(String shiftid5) {
		this.shiftid5 = shiftid5;
	}

	public String getStartDate2() {
		return startDate2;
	}

	public void setStartDate2(String startDate2) {
		this.startDate2 = startDate2;
	}

	public String getEndDate2() {
		return endDate2;
	}

	public void setEndDate2(String endDate2) {
		this.endDate2 = endDate2;
	}

	public String getStartDate3() {
		return startDate3;
	}

	public void setStartDate3(String startDate3) {
		this.startDate3 = startDate3;
	}

	public String getEndDate3() {
		return endDate3;
	}

	public void setEndDate3(String endDate3) {
		this.endDate3 = endDate3;
	}

	public String getStartDate4() {
		return startDate4;
	}

	public void setStartDate4(String startDate4) {
		this.startDate4 = startDate4;
	}

	public String getEndDate4() {
		return endDate4;
	}

	public void setEndDate4(String endDate4) {
		this.endDate4 = endDate4;
	}

	public String getStartDate5() {
		return startDate5;
	}

	public void setStartDate5(String startDate5) {
		this.startDate5 = startDate5;
	}

	public String getEndDate5() {
		return endDate5;
	}

	public void setEndDate5(String endDate5) {
		this.endDate5 = endDate5;
	}

	public String getScheduleid() {
		return scheduleid;
	}

	public void setScheduleid(String scheduleid) {
		this.scheduleid = scheduleid;
	}

	public String getLeaveJson() {
		return leaveJson;
	}

	public void setLeaveJson(String leaveJson) {
		this.leaveJson = leaveJson;
	}
	
	
	public String getYear_month() {
		return year_month;
	}

	public void setYear_month(String year_month) {
		this.year_month = year_month;
	}

	public String getSitename() {
		return sitename;
	}

	public void setSitename(String sitename) {
		this.sitename = sitename;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
}
